<div class="portlet box green">
	<div class="portlet-title">
	    <div class="caption"><i class="fa fa-cog"></i>查询内容 </div>
		<div class="tools">
			<a href="javascript:;" class="collapse right" data-original-title="" title=""> </a>
			<!-- <a href="" class="fullscreen" data-original-title="" title=""> </a> -->
    	</div>
    	<div class="actions">
			<a href="javascript:;" class="btn white btn-sm ajax-search"><i class="fa fa-search"></i> 查询 </a>
			<a href="javascript:;" class="btn white btn-sm search-reset"><i class="fa fa-eraser"></i> 清除 </a>
			<a href="/departmentsCompany/staffList?departmentId=$!companyDepartment.id&companyId=$!companyDepartment.companyId" class=" btn-left btn white btn-sm ajaxify"><i class="fa fa-mail-reply"></i> 返回</a>
		</div>
	</div>
	<div class="portlet-body form">
	   	<form action="/departmentsCompany/staffAdd" class="form-horizontal" method="get" id="searchForm">
			<div class="form-body">
				<div class="row">
					<div class="col-md-3">
						<label class="col-md-4 control-label">账号ID：</label>
						<div class="col-md-8">
					    	<input type="text" class="form-control" name="userId" value="$!userId">
					    	<input type="hidden" name="departmentId"  value="$!companyDepartment.id">
						</div>
					</div>
					<div class="col-md-3">
						<label class="col-md-4 control-label">昵称姓名：</label>
						<div class="col-md-8">
					    	<input type="text" class="form-control" name="nickname" value="$!nickname">
						</div>
					</div>
						<div class="col-md-3">
							<label class="control-label col-md-4">注册时间</label> 
							<label class="col-md-8">
								<input class="form-control" type="text" name="startTime" id="startTime" value="$!startTime" readonly>
								<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
							</label>
						</div>
						<div class="col-md-3">
							<label class="control-label col-md-2">至：</label> 
							<label class="col-md-8">
								<input class="form-control" type="text" name="endTime" id="endTime" value="$!endTime" readonly>
								<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
							</label>
						</div>
	    		</div>
			</div>
		</form>
	</div>
</div>
 <div class="portlet box green">
    <div class="portlet-title">
		<div class="caption"><i class="fa fa-cogs"></i>数据列表</div>
		<div class="tools"><a href="javascript:;" class="collapse" data-original-title="" title=""> </a></div>
    </div>
    <div class="portlet-body">
        <div class="table-scrollable">
             <table class="table table-striped table-bordered table-advance table-hover" id="tableCategory">
                  <thead>
						<tr>
						<th>会员号</th>
						<th>昵称</th>
						<th>会员等级</th>
						<th>手机号</th>
						<th>真实姓名</th>
						<th>部门</th>
						<th>注册日期</th>
						<th>操作</th>
					</tr>
                   </thead>
                   <tbody>
                       #foreach($item in $!pageUserInfo.result)
                       #set($memberLevel =  $!memberLevelMap.get($item))
                       #set($dt = $!departemntMap.get($item))
                        <tr>
                              <td class="highlight"> $!item.id </td>
                              <td class="hidden-xs"> $!item.nickname</td>
                              <td>$!memberLevel.name</td>
                              <td>$!item.phone</td>
                              <td>$!item.realname</td>
                              <td class="dtname">$!dt.title</td>
                              <td>$!item.createTime</td>
                              <td>
                              		#if($item.departmentId != $!companyDepartment.id)
                              	  <a thref="departmentsCompany/employee?departmentId=$!companyDepartment.id&id=$!item.id"    class="btn green btn-outline btn-sm ajax-editState addEmployee" href="javascript:;">
                            	  <i class="fa fa-edit" ></i>添加至该部门</a>
                          	  		#end
                          	  </td>
                       	</tr>
                      #end
                 </tbody>
            </table>
       </div>
		#set($page= $!pageUserInfo) 
		#set($pageUrl="/department/staffAdd?$!queryString&pageNo=") 
		#parse("_page.htm")
   </div>
</div>
 <script type="text/javascript">
$(".addEmployee","#tableCategory").on("click",function(){
	  var  newbt  = "$!companyDepartment.title";
	  var oldbt= $(this).parents("tr").children(".dtname");
	  $(oldbt).text(newbt);
	  $(this).hide();
	});
</script>
<script src="/assets/scripts/views-date.js" type="text/javascript"></script>
